home *** CD-ROM | disk | FTP | other *** search
/ ftp.mactech.com 2010 / ftp.mactech.com.tar / ftp.mactech.com / machack / Hacks97 / WarriorsProgress.sit / Warrior’s Progress / source code / Source / Libraries / Processes / ProcessInfo.h < prev    next >
Text File  |  1997-06-28  |  2KB  |  64 lines

  1. // ProcessInfo.h
  2.  
  3. #ifndef ProcessInfo_h
  4. #define ProcessInfo_h
  5.  
  6. #ifndef Process_h
  7. #include "Process.h"
  8. #endif
  9. #ifndef FileLocation_h
  10. #include "FileLocation.h"
  11. #endif
  12. #ifndef Tick_h
  13. #include "Tick.h"
  14. #endif
  15.  
  16. class ProcessInfo: public ProcessInfoRec
  17.   {
  18.     private:
  19.         Str31 name;
  20.         FileLocation file;
  21.         
  22.     public:
  23.         ProcessInfo( ::Process );
  24.         ProcessInfo( ::Process::ApplicationProcess );
  25.         
  26.         void Get( ::Process );
  27.         void Get( ::Process::ApplicationProcess );
  28.         
  29.         static const ProcessInfo& Application();
  30.         
  31.         ConstPString Name() const                { return name; }
  32.         ::Process Process() const                { return processNumber; }
  33.         FileType Type() const                    { return FileType::Make( processType ); }
  34.         FileSignature Signature() const        { return FileSignature::Make( processSignature ); }
  35.         
  36.         const void *PartitionStart() const    { return processLocation; }
  37.         uint32 PartitionSize() const            { return processSize; }
  38.         ConstData Partition() const            { return ConstData( PartitionStart(), PartitionSize() ); }
  39.         
  40.         uint32 FreeMemory() const                { return processFreeMem; }
  41.         bool HasLauncher() const;
  42.         ::Process Launcher() const                { Assert( HasLauncher() ); return processLauncher; }
  43.         Tick LaunchTick() const                    { return processLaunchDate; }
  44.         uint32 ActiveTicks() const                { return processActiveTime; }
  45.         
  46.         const FileLocation& File() const        { return file; }
  47.         
  48.         bool IsDeskAccessory() const            { return (processMode & modeDeskAccessory) != 0; }
  49.         bool CanMultiLaunch() const            { return (processMode & modeMultiLaunch) != 0; }
  50.         bool NeedsSuspendResume() const        { return (processMode & modeNeedSuspendResume) != 0; }
  51.         bool CanBackground() const                { return (processMode & modeCanBackground) != 0; }
  52.         bool ActivatesOnResume() const        { return (processMode & modeDoesActivateOnFGSwitch) != 0; }
  53.         bool OnlyBackground() const            { return (processMode & modeOnlyBackground) != 0; }
  54.         bool GetsFrontClicks() const            { return (processMode & modeGetFrontClicks) != 0; }
  55.         bool GetsApplicationDied() const        { return (processMode & modeGetAppDiedMsg) != 0; }
  56.         bool CleanFor32Bits() const            { return (processMode & mode32BitCompatible) != 0; }
  57.         bool HighLevelEventAware() const        { return (processMode & modeHighLevelEventAware) != 0; }
  58.         bool GetsRemoteEvents() const            { return (processMode & modeLocalAndRemoteHLEvents) != 0; }
  59.         bool StationeryAware() const            { return (processMode & modeStationeryAware) != 0; }
  60.         bool UsesTextEditServices() const    { return (processMode & modeUseTextEditServices) != 0; }
  61.   };
  62.  
  63. #endif
  64.